package com.hung.mapper;

import com.hung.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2017/4/17.
 */
@Mapper
public interface UserMapper {

    @Select("SELECT id,user_name as userName, password , real_name as realName,create_date as createDate " +
            " FROM t_user where user_name = #{userName} ")
    User getUserByUserName(@Param("userName") String userName);

    List<User> list(@Param("realName") String realName,@Param("userName") String userName);
}
